import * as echarts from 'echarts/core';
import { BarChart } from 'echarts/charts';

import { useEffect, useRef } from 'react';

function Workbench() {
    const chartRef = useRef<HTMLDivElement>(null);
    useEffect(() => {
        var myChart = echarts.init(chartRef.current);
        var option;

        option = {
            xAxis: {
                type: 'category',
                data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
            },
            yAxis: {
                type: 'value'
            },
            series: [
                {
                    data: [120, 200, 150, 80, 70, 110, 130],
                    type: 'bar'
                }
            ]
        };

        option && myChart.setOption(option);
    }, []);

    return (
        <div className="workbench" ref={chartRef}>

        </div>
    )
}

export default Workbench;